<?php
/*
Module:		div
Version:	20071128a-DAT
File:		run.php
*/
     /* TIME */
     if(strtoupper($con['buffer']['text']) == '!TIME')
     {
      cmd_send(prep_text("Time", date("F j, Y, g:i a", time())));
     }
   	if(strtoupper($args[0]) == '!KICK')
    {//!kick
     if (count($args) < 2)  cmd_send("KICK ".$con['buffer']['channel'].' :'.$con['buffer']['username'].' :'.$CONFIG['self_kick_msg']);
  	}//!kick

  if(strtoupper($args[0]) == '!STFU')
  {//!stfu
		 if (count($args) >= 2)  cmd_send("PRIVMSG ".$args[1]." :\001 STFU\001");
     if (count($args) < 2)  cmd_send("PRIVMSG ".$con['buffer']['username']." :\001 STFU\001");
	}//!stfu
  if(strtoupper($args[0]) == '!INFO')
  {//!info
		 if (count($args) >= 2)  cmd_send("PRIVMSG ".$args[1]." :\001USERINFO\001");
     if (count($args) < 2)  cmd_send("PRIVMSG ".$con['buffer']['username']." :\001USERINFO\001");
	}//!info
	//CTCP
	//VERSION
  if(strtoupper($con['buffer']['text']) == "\001VERSION\001")
     cmd_send("NOTICE ".$con['buffer']['username']." :\001 VERSION Free-Chao IRC-Bot by Dr. Azrael Tod - ".$CONFIG['version']."\001");
  //USERINFO
  if(strtoupper($con['buffer']['text']) == "\001USERINFO\001")
     cmd_send("NOTICE ".$con['buffer']['username']." :\001USERINFO ".$CONFIG['userinfo']."\001");

 	if(strtoupper($args[0]) == '!HILFE')
  {//!hilfe
		cmd_send(prep_text("Hint", "Try !COMMANDS ;-)"));
	}//!hilfe

	if(strtoupper($args[0]) == '!BLOG')
  {//!blog
		cmd_send(prep_text("Blog", $CONFIG["blog-url"]));
	}//!blog

	


	if($CONFIG['admin_nick']==$con['buffer']['username'])
	{//ADMINCOMMANDS
    if(strtoupper($args[0]) == '!SAY')
    {//!Say
      cmd_send("PRIVMSG ".implode(array_slice($args,1),' '));
  	}//!Say
	}//ADMINCOMMANDS
	
//register commands 
if(strtoupper($args[0]) == "!COMMANDS")
{
	$COMMANDS=$COMMANDS.", !TIME, !KICK, !STFU, !INFO, [!HILFE], !BLOG, [!HELP]";
}
	

?>
